package com.wnnight.wys.entity.car;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wnnight.wys.entity.lanlord.Landlord;
import com.wnnight.wys.groupInterface.AddGroup;
import com.wnnight.wys.groupInterface.AlterGroup;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @ClassName: Park
 * @Description: 车位实体类
 * @author: CHX42
 * @date: 2022/8/27-19:39
 * @version: v1.0
 */
@Setter
@Getter
@ToString
@TableName(value = "park",keepGlobalPrefix = true)
public class Park {
    @TableId(type = IdType.AUTO)
    @NotNull(message = "ID为空", groups = {AlterGroup.class})
    private Integer id;
    @TableField("park_num")
    private String parkNum;
    @TableField("landlord_id")
    private Integer landlordId;
    @TableField("status")
    @NotBlank(message = "状态为空", groups = {AddGroup.class})
    private String status;
    @TableField("type")
    private String type;

    @TableField(exist = false)
    private Landlord landlord;
    @TableField(exist = false)
    private String name;
    @TableField(exist = false)
    private String phone;
    @TableField(exist = false)
    private String gender;
    @TableField(exist = false)
    private String place;
    @TableField(exist = false)
    private String carNum;

}
